# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-inquirer
pkgver=3.2.4
pkgrel=1
pkgdesc="collection of common interactive command line user interfaces"
url="https://github.com/magmax/python-inquirer"
arch="noarch"
license="MIT"
depends="python3 py3-blessed py3-readchar py3-python-editor"
makedepends="py3-poetry-core py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-flake8 py3-pexpect py3-pytest py3-pytest-cov py3-pytest-xdist
	py3-mock py3-nosexcover py3-coveralls py3-wheel ncurses-terminfo"
# GH tarballs required for tests!
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/magmax/python-inquirer/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-inquirer-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	TERM=xterm-256color PYTHONPATH=src pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/inquirer-$pkgver-*.whl
}

sha512sums="
3960ca5bf836bc56431658ede39e86e40cce6cb368f7fced5f364d76ceb1b458c3ac3fb02ee3878d2bf978f5b33bb6867e87520b9d6407210eea5a912a2cb1f3  py3-inquirer-3.2.4.tar.gz
"
